home *** CD-ROM | disk | FTP | other *** search
/ Know Your Hockey - The Greatest Player Resource / Know Your Hockey: The Greatest Player Resource.iso / hockey / director / ssqcst.cst / 00049_Script_DisplayText < prev    next >
Text File  |  1998-09-28  |  2KB  |  50 lines

  1. global gTheBench, gXcast,gTxtonDeck
  2. on mousedown
  3.   set gTxtonDeck = [] -- clear the current list of txt cards
  4.   puppetsprite 42,1
  5.   set current = the name of member (the membernum of sprite 7) of castlib gXCast -- see which card is currently on screen
  6.   set templist = getaprop(gTheBench,#Card)-- get the current card list
  7.   set which = getpos(templist,current) -- find which position the card card is from
  8.   if which = 0 then exit-- this happens if the user double clicks too quickly and the computer is slow will read the textback name
  9.   set textlist =getaprop (gTheBench,#Text)-- get the available text files
  10.   set gTxtonDeck =  getat(textlist,which)--- find the same position in the text file list & set the current txt list
  11.   set theCard =getat(gTxtonDeck ,1)-- find the first txt card
  12.   
  13.   -- place the fabulous txt card on the screen
  14.   set the membernum of sprite 7 = the number of member  theCard
  15.   
  16.   
  17.   
  18.   --- put the buttons in place and attach scripts
  19.   set t = count (gTxtonDeck)
  20.   if T > 1 then
  21.     repeat with x = 9 to 10
  22.       puppetsprite x, 1
  23.       set the type of sprite x = 16
  24.       set the loch of sprite x =  the loch  of sprite 7
  25.       set the locv  of sprite x =  the locv  of sprite 7
  26.       set the ink of sprite x = 32
  27.       set the blend of sprite x = 0
  28.       set the visible of sprite x = 1
  29.       set the ink of sprite x = 32
  30.     end repeat
  31.     set the membernum of sprite 9 = 0
  32.     set the membernum of sprite 10  = the number of member  "TextDown" of castlib "SSQCST"
  33.   end if
  34.   
  35.   
  36.   set  D = the number of member "Scrolldown" of castlib "SSQCST"
  37.   set p2 = the number of member  "Textdown" of castlib "SSQCST"
  38.   set  the scriptText of member p2= the scriptText of member D
  39.   
  40.   set p = the number of member "Showcard" of castlib "SSQCST"
  41.   set t = the number of member "HideText" of castlib "SSQCST"
  42.   set the membernum of sprite 43 = p 
  43.   set  the scriptText of member p = the scriptText of member t
  44.   
  45.   -- change the detail button to match the back of the card
  46.   set the membernum of sprite 40 = the number of member  "Detailsb" of castlib "SSQCST"
  47.   set the scriptText of member  "Detailsb" of castlib "SSQCST" =¼
  48. The scriptText of member (the number of member  "DetailScript" of castlib "SSQCST")
  49. end
  50.